package team.pikachu.pikachuclient.utils;

import android.content.Context;
import android.net.ConnectivityManager;

/**
 * Created by Alex on 2017/9/11.
 */

public class InternetUtils {
    public static boolean isOpenNetwork(Context context) {
        ConnectivityManager connManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
        if (connManager.getActiveNetworkInfo() != null) {
            return connManager.getActiveNetworkInfo().isAvailable();
        }
        return false;
    }
}
